package com.oracle.zebrafreelytraveling.ui.adapter;

import android.content.Context;
import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentPagerAdapter;
import android.support.v4.app.FragmentTabHost;

import java.util.List;

/**
 * Created by yydcnjjw on 2017/7/20.
 */

public class ViewPagerAdapter extends FragmentPagerAdapter {
    private Context mContext;
    private List<Fragment> mList;

    public ViewPagerAdapter(FragmentManager fm, Context cx, List<Fragment> list) {
        super(fm);
        mList = list;
        mContext = cx;
    }

    @Override
    public Fragment getItem(int position) {
        return mList.get(position);
    }

    @Override
    public int getCount() {
        return mList.size();
    }
}
